1. Field of the Invention
The present invention relates to a semiconductor device including a photosensor. The present invention also relates to a semiconductor device including a photosensor and a display element. Further, the present invention relates to an electronic device including a semiconductor device.
2. Description of the Related Art
An example of a semiconductor device including a sensor that detects light (also referred to as a photosensor or an optical sensor) is a solid-state imaging device (also referred to as an image sensor) used in electronic devices such as digital still cameras and mobile phones.
In particular, a semiconductor device including a display element in addition to a photosensor is called a touch panel, a touchscreen, and the like (hereinafter simply referred to as a touch panel). In a semiconductor device including a photosensor and a display element, a display screen also serves as a data input region.
Examples of photosensors are a CMOS sensor and a CCD sensor. A CMOS sensor includes a photoelectric conversion element such as a photodiode and an amplifier circuit including a MOS transistor. The amount of photocurrent flowing through the photoelectric conversion element is determined by the intensity of light with which the photoelectric conversion element is irradiated. The amplifier circuit stores electric charge corresponding to the amount of photocurrent and generates an output signal that includes the amount of the electric charge as data. The CMOS sensor detects the amount of light that enters the photoelectric conversion element by performing the following operations by the amplifier circuit including a MOS transistor: an operation of discharging electric charge stored in the amplifier circuit (hereinafter referred to as the reset operation); an operation of storing electric charge corresponding to the amount of photocurrent flowing through the photoelectric conversion element (hereinafter referred to as the storage operation); and an operation of reading an output signal including the amount of the electric charge as data (hereinafter referred to as the selection operation). CMOS sensors can be fabricated through a general CMOS process. Thus, in a semiconductor device including a CMOS sensor as a photosensor, production costs can be reduced, and a display element can be formed over a substrate where the photosensor is formed. In addition, a CMOS sensor needs lower driving voltage than a CCD sensor; therefore, power consumption of the semiconductor device can be suppressed.
In a semiconductor device including photosensors, light is generated from the semiconductor device first. When an object to be detected exists, the light is blocked by the object and partly reflected. In the semiconductor device, the photosensors are arranged in matrix and detect the amount of light reflected from the object. In such a manner, the semiconductor device captures an image of an object to be detected and detects a region where the object exists.
In the above semiconductor device, noise due to external light needs to be reduced in order to detect a region where the object exists with high accuracy and to capture an image of the object with high accuracy. When noise due to external light is large, the S/N ratio at the time of detecting the amount of light reflected from the object is decreased; thus, the accuracy of detecting a region where the object exists is lowered, and the quality of a captured image is degraded. In particular, in the case where a display screen of a touch panel is used as a data input region, error and failure of input detection are caused.
In order to solve such a problem, a method disclosed in Non-Patent Document 1 is proposed. Non-Patent Document 1 discloses a semiconductor device including CMOS sensors arrange in matrix.
In the semiconductor device in Non-Patent Document 1, a backlight is turned on and an object to be detected is irradiated with light, photosensors in odd-numbered rows perform the reset operation and the storage operation. Then, the backlight is turned off, and photosensors in even-numbered rows perform the reset operation and the storage operation. The time interval of blinking the backlight is short, and it can be considered that an object to be detected hardly moves between when the backlight is on and when the backlight is off. Then, photosensors in adjacent two rows simultaneously perform the selection operation, and by sequentially repeating such an operation, the selection operation for the photosensors in all the rows is performed. Thus, a difference between output signals obtained from photosensors in adjacent rows is obtained. The difference is a signal component whose S/N ratio is improved because noise due to external light is cancelled. Non-Patent Document 1 proposes that a captured image of an object to be detected is generated with the difference.